Imports System
Imports System.Data
Imports System.Configuration
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports System.Collections.Generic
Imports ASPNET.StarterKit.BusinessLogicLayer


Partial Public Class Login_aspx
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load

        Dim isAllowUserCreationForAnonymousUsers As String = ConfigurationManager.AppSettings("AllowUserCreationForAnonymousUsers")
        If String.IsNullOrEmpty(isAllowUserCreationForAnonymousUsers) Then
            Return
        End If

        If Page.User.Identity.IsAuthenticated OrElse ((Not Page.User.Identity.IsAuthenticated) AndAlso String.Compare(isAllowUserCreationForAnonymousUsers, "1") = 0) Then
            Login1.CreateUserText = "Create new user"
            Login1.CreateUserUrl = "~/TimeTracker/User_Create.aspx"
        End If

    End Sub

End Class
